package Service;

import Dao.ManagerDao;
import Dao.ManagerDaoImpl;
import model.Manager;
import model.PageInfo;
import model.Student;

import java.util.List;

/**
 * @author cyt
 * @date 2020/8/8
 */
public class ManagerService {

    private ManagerDao managerDao;

    public ManagerService(){
        this.managerDao = new ManagerDaoImpl();
    }

    public Manager managerLogin(Manager manager){
        return managerDao.login(manager);
    }

    public List<Student> findAllStudents(PageInfo pageInfo){
        return managerDao.findAll(pageInfo);
    }


    public Student findByNum(Integer num){
        return managerDao.findByNum(num);
    }


    public void delete(String[] ids){
        managerDao.delete(ids);
    }

    public void update(Student student){
        managerDao.update(student);
    }

    public void insert(Student student){
        managerDao.insert(student);
    }
}
